<template>
  <!-- 顶部导航组件 -->
  <div class="nav">
    <div class="nav-left" @click="toHome">
      <Data></Data>
      <p class="title">大数据PASS</p>
    </div>
    <a class="register" @click="toRegister">立即注册</a>
    <a class="login" @click="toLogin">登录</a>
    <a class="control" @click="toConsole">控制台</a>
    <a-input-search
      class="search"
      size="large"
      placeholder=""
      style="width: 200px"
      @search="onSearch"
    />
  </div>
</template>

<script>
import Data from "@/components/svg/Data.vue"
export default {
  name: "TopNav",
  components: {
    Data
  },
  methods: {
    toHome() {
      this.$router.push({ path: '/' })
    },
    toLogin() {
      this.$router.push({ path: '/login' })
    },
    toRegister() {
      this.$router.push({ path: '/register' })
    },
    toConsole() {
      this.$router.push({ path: '/console' })
    },
    onSearch() {
      
    }
  }
};
</script>

<style lang="less" scoped>
.nav {
  width: 100%;
  height: 60px;
  background-color: #dbdbdb;
  overflow: hidden;

  .nav-left {
    .title {
      color: #ff6a00;
      float: left;
      margin: 0 0 0 20px;
      line-height: 60px;
      font-size: 35px;
      font-weight: 900;
      letter-spacing: 20px;
    }

    .icon {
      float: left;
      margin-left: 5%;
      margin-top: 10px;
    }

  }

  .nav-left:hover {
    cursor: pointer;
  }

  .search {
    margin-top: 10px;
    margin-right: 30px;
    float: right;
  }

  .control {
    float: right;
    width: 50px;
    height: 60px;
    line-height: 60px;
    font-weight: 500;
    color: #361836;
  }

  .login {
    float: right;
    width: 100px;
    height: 60px;
    line-height: 60px;
    font-weight: 500;
    color: #361836;
  }

  .login:hover,
  .control:hover {
    cursor: pointer;
    color: #ff6a00;
  }

  .register {
    width: 140px;
    height: 60px;
    line-height: 60px;
    padding: 0;
    background-color: #ff6a00;
    font-weight: 600;
    color: #ffffff;
    float: right;
  }

  .register:hover {
    cursor: pointer;
    background-color: #ff791a;
  }
}
.nav:hover {
  background-color: #ffffff;
  border: 0;
}
</style>